package CH07.Enum;

/**
 * Created by lenovo on 2016/3/27.
 */
import static java.lang.System.out;

public class Game {
    public static void main(String[] args) {
        play(Action.RIGHT);
        play(Action.UP);
    }

    public static void play(Action action) {
        switch(action) {
            case STOP:
                out.println("停止动画");
                break;
            case RIGHT:
                out.println("向右动画");
                break;
            case LEFT:
                out.println("向左动画");
                break;
            case UP:
                out.println("向上动画");
                break;
            case DOWN:
                out.println("向下动画");
                break;
        }
    }
}